// 报销借款管理路由
import Layout from '@/layout'

const reimburseRouter = {
  // 报销借款管理
  path: '/reimburse',
  component: Layout,
  redirect: '/reimburse/priorApplication/bussinessTrip',
  name: 'reimburse',
  meta: { title: '报销借款管理', icon: 'el-icon-s-order', menuId: 10100000 },
  children: [
    {
      path: 'priorApplication',
      name: 'priorApplication',
      redirect: '/reimburse/priorApplication/bussinessTrip',
      component: () => import('@/views/reimburse/index'), // Parent router-view
      meta: { title: '事前申请', menuId: 10100000 },
      children: [
        {
          path: 'bussinessTrip',
          name: 'bussinessTrip',
          component: () => import('@/views/reimburse/priorApplication/bussinessTrip/index'),
          meta: { title: '出差申请', menuId: 10100000 }
        },
        {
          path: 'bussinessTrip/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/bussinessTrip/detail'),
          name: 'detail',
          meta: { title: '出差申请', activeMenu: '/reimburse/priorApplication/bussinessTrip', menuId: 10020001 },
          hidden: true
        },
        {
          path: 'training',
          name: 'training',
          component: () => import('@/views/reimburse/priorApplication/training/index'),
          meta: { title: '培训费申请', menuId: 10100000 }
        },
        {
          path: 'training/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/training/detail'),
          name: 'detail',
          meta: { title: '培训费申请', activeMenu: '/reimburse/priorApplication/training', menuId: 10020001 },
          hidden: true
        },
        {
          path: 'aircrew',
          name: 'aircrew',
          component: () => import('@/views/reimburse/priorApplication/aircrew/index'),
          meta: { title: '外借机组申请', menuId: 10100000 }
        },
        {
          path: 'aircrew/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/aircrew/detail'),
          name: 'detail',
          meta: { title: '外借机组申请', activeMenu: '/reimburse/priorApplication/aircrew', menuId: 10020001 },
          hidden: true
        },
        {
          path: 'specialOperation',
          name: 'specialOperation',
          component: () => import('@/views/reimburse/priorApplication/specialOperation/index'),
          meta: { title: '运行特殊申请', menuId: 10100000 }
        },
        {
          path: 'specialOperation/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/specialOperation/detail'),
          name: 'detail',
          meta: { title: '运行特殊申请', activeMenu: '/reimburse/priorApplication/specialOperation', menuId: 10020001 },
          hidden: true
        },
        {
          path: 'unreturnCosts',
          name: 'unreturnCosts',
          component: () => import('@/views/reimburse/priorApplication/unreturnCosts/index'),
          meta: { title: '无法从客户收回成本', menuId: 10100000 }
        },
        {
          path: 'unreturnCosts/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/unreturnCosts/detail'),
          name: 'detail',
          meta: { title: '无法从客户收回成本', activeMenu: '/reimburse/priorApplication/unreturnCosts', menuId: 10020001 },
          hidden: true
        },
        {
          path: 'productionAssets',
          name: 'productionAssets',
          component: () => import('@/views/reimburse/priorApplication/productionAssets/index'),
          meta: { title: '生产类资产申请', menuId: 10100000 }
        },
        {
          path: 'productionAssets/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/productionAssets/detail'),
          name: 'detail',
          meta: { title: '生产类资产申请', activeMenu: '/reimburse/priorApplication/productionAssets', menuId: 10020001 },
          hidden: true
        },
        {
          path: 'refund',
          name: 'refund',
          component: () => import('@/views/reimburse/priorApplication/refund/index'),
          meta: { title: '退款申请单', menuId: 10100000 }
        },
        {
          path: 'refund/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/refund/detail'),
          name: 'detail',
          meta: { title: '退款申请单', activeMenu: '/reimburse/priorApplication/refund', menuId: 10020001 },
          hidden: true
        },
        {
          path: 'mutualAssistance',
          name: 'mutualAssistance',
          component: () => import('@/views/reimburse/priorApplication/mutualAssistance/index'),
          meta: { title: '第三方/内部互援销售单', menuId: 10100000 }
        },
        {
          path: 'mutualAssistance/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/mutualAssistance/detail'),
          name: 'detail',
          meta: { title: '第三方/内部互援销售单', activeMenu: '/reimburse/priorApplication/mutualAssistance', menuId: 10020001 },
          hidden: true
        },
        {
          path: 'selfCharging',
          name: 'selfCharging',
          component: () => import('@/views/reimburse/priorApplication/selfCharging/index'),
          meta: { title: '自主收费申请单', menuId: 10100000 }
        },
        {
          path: 'selfCharging/:id(\\d+)',
          component: () => import('@/views/reimburse/priorApplication/selfCharging/detail'),
          name: 'detail',
          meta: { title: '自主收费申请单', activeMenu: '/reimburse/priorApplication/selfCharging', menuId: 10020001 },
          hidden: true
        }
      ]
    },
    {
      path: 'companyManagement',
      name: 'companyManagement',
      redirect: '/reimburse/companyManagement/universal',
      component: () => import('@/views/reimburse/index'),
      meta: { title: '公司管理类报销单' },
      children: [
        {
          path: 'universal',
          name: 'universal',
          component: () => import('@/views/reimburse/companyManagement/universal/index'),
          meta: { title: '通用报销单' }
        },
        {
          path: 'universal/create',
          component: () => import('@/views/reimburse/companyManagement/universal/detail'),
          name: 'universal-create',
          meta: { title: '通用报销单', activeMenu: '/reimburse/companyManagement/universal' },
          hidden: true
        },
        {
          path: 'universal/:id(\\d+)',
          component: () => import('@/views/reimburse/companyManagement/universal/detail'),
          name: 'universal-detail',
          meta: { title: '通用报销单', activeMenu: '/reimburse/companyManagement/universal' },
          hidden: true
        },
        {
          path: 'travelOnBusiness',
          name: 'travelOnBusiness',
          component: () => import('@/views/reimburse/companyManagement/travelOnBusiness/index'),
          meta: { title: '差旅费报销单' }
        },
        {
          path: 'travelOnBusiness/create',
          component: () => import('@/views/reimburse/companyManagement/travelOnBusiness/detail'),
          name: 'travelOnBusinessCreate',
          meta: { title: '差旅费报销单', activeMenu: '/reimburse/companyManagement/travelOnBusiness' },
          hidden: true
        },
        {
          path: 'travelOnBusiness/:id(\\d+)',
          component: () => import('@/views/reimburse/companyManagement/travelOnBusiness/detail'),
          name: 'travelOnBusinessDetail',
          meta: { title: '差旅费报销单', activeMenu: '/reimburse/companyManagement/travelOnBusiness' },
          hidden: true
        },
        {
          path: 'property',
          name: 'property',
          component: () => import('@/views/reimburse/companyManagement/property/index'),
          meta: { title: '资产报销单' }
        },
        {
          path: 'property/create',
          component: () => import('@/views/reimburse/companyManagement/property/detail'),
          name: 'property-create',
          meta: { title: '资产报销单', activeMenu: '/reimburse/companyManagement/property' },
          hidden: true
        },
        {
          path: 'property/:id(\\d+)',
          component: () => import('@/views/reimburse/companyManagement/property/detail'),
          name: 'property-detail',
          meta: { title: '资产报销单', activeMenu: '/reimburse/companyManagement/property' },
          hidden: true
        }
      ]
    }
  ]
}

export default reimburseRouter
